<?php
namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;

class CourseVideo extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'course_video';

    protected $primaryKey = 'id';

    protected $fillable = [
        'course_id', // 课程ID
        'course_source_id', // 课程素材ID
        'sort', // 排序值
    ];

    public function source()
    {
        return $this->belongsTo(CourseSource::class, 'course_source_id');
    }
}
